﻿using Zinnia.Logging;

namespace Zinnia
{
    /// <summary>
    /// 每个工作单元实例化服务的基类接口
    /// </summary>
    public interface IDependency { }
    /// <summary>
    /// 单例依赖，每个外壳或者租户实例化服务的接口
    /// </summary>
    public interface ISingletonDependency : IDependency { }
    /// <summary>
    /// 单元模式依赖，该接口用于保证一系列对象不引用于单例依赖
    /// </summary>
    public interface IUnitOfWorkDependency : IDependency { }
    /// <summary>
    /// 瞬时依赖
    /// </summary>
    public interface ITransientDependency : IDependency { }

    /// <summary>
    /// 抽象的组建
    /// </summary>
    public abstract class Component
    {
        protected Component()
        {
            Logger = NullLogger.Instance;
        }
        /// <summary>
        /// 日志记录器
        /// </summary>
        public ILogger Logger { get; set; }
    }
}
